package com.lovejes.cuniao.domain.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the cn_cfrom table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="cn_cfrom"
 */

public abstract class BaseCnCfrom  implements Serializable {

	public static String REF = "CnCfrom";
	public static String PROP_SECRET = "Secret";
	public static String PROP_CUSERID = "Cuserid";
	public static String PROP_USERID = "Userid";
	public static String PROP_ID = "Id";
	public static String PROP_OAUTH = "Oauth";
	public static String PROP_CFROM = "Cfrom";
	public static String PROP_FLAG = "Flag";


	// constructors
	public BaseCnCfrom () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseCnCfrom (java.lang.String id) {
		this.setId(id);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.String id;

	// fields
	private java.lang.String userid;
	private java.lang.String oauth;
	private java.lang.String secret;
	private java.lang.String cuserid;
	private java.lang.String cfrom;
	private java.lang.String flag;


	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="uuid"
     *  column="ID"
     */
	public java.lang.String getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.String id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: USERID
	 */
	public java.lang.String getUserid () {
		return userid;
	}

	/**
	 * Set the value related to the column: USERID
	 * @param userid the USERID value
	 */
	public void setUserid (java.lang.String userid) {
		this.userid = userid;
	}



	/**
	 * Return the value associated with the column: OAUTH
	 */
	public java.lang.String getOauth () {
		return oauth;
	}

	/**
	 * Set the value related to the column: OAUTH
	 * @param oauth the OAUTH value
	 */
	public void setOauth (java.lang.String oauth) {
		this.oauth = oauth;
	}



	/**
	 * Return the value associated with the column: SECRET
	 */
	public java.lang.String getSecret () {
		return secret;
	}

	/**
	 * Set the value related to the column: SECRET
	 * @param secret the SECRET value
	 */
	public void setSecret (java.lang.String secret) {
		this.secret = secret;
	}



	/**
	 * Return the value associated with the column: CUSERID
	 */
	public java.lang.String getCuserid () {
		return cuserid;
	}

	/**
	 * Set the value related to the column: CUSERID
	 * @param cuserid the CUSERID value
	 */
	public void setCuserid (java.lang.String cuserid) {
		this.cuserid = cuserid;
	}



	/**
	 * Return the value associated with the column: CFROM
	 */
	public java.lang.String getCfrom () {
		return cfrom;
	}

	/**
	 * Set the value related to the column: CFROM
	 * @param cfrom the CFROM value
	 */
	public void setCfrom (java.lang.String cfrom) {
		this.cfrom = cfrom;
	}


	public java.lang.String getFlag() {
		return flag;
	}

	public void setFlag(java.lang.String flag) {
		this.flag = flag;
	}

	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.lovejes.cuniao.domain.CnCfrom)) return false;
		else {
			com.lovejes.cuniao.domain.CnCfrom cnCfrom = (com.lovejes.cuniao.domain.CnCfrom) obj;
			if (null == this.getId() || null == cnCfrom.getId()) return false;
			else return (this.getId().equals(cnCfrom.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}